{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "10eef938",
   "metadata": {},
   "source": [
    "### 代码实现"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "142a326f",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入必要的库\n",
    "import torch\n",
    "import torch.nn as nn\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# 随机数种子\n",
    "torch.manual_seed(2333)\n",
    "\n",
    "# 定义超参数\n",
    "num_samples = 20 # 样本数\n",
    "hidden_size = 200 # 隐藏层大小\n",
    "num_epochs = 500  # 训练轮数"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cc854ac5",
   "metadata": {},
   "source": [
    "### 数据生成"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "c4ebe862",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8+yak3AAAACXBIWXMAAAsTAAALEwEAmpwYAAAdUklEQVR4nO3df5AV5Z3v8fcXRAaUwBGIAuMIJrhqJSPqFOI1leiqEawt0FljMOWNRlITc/Xe7N4LG4xJLknVvZddqWxCGTVUlo3ZbEW9Oq6kJFcwQqkViQ4UjiAIg+vCABGCw0SiEJHv/aN75ADnMD+6T/c53Z9X1dTp0/2cfr7TZ+Z7nvP000+buyMiItk3KO0AREQkGUr4IiI5oYQvIpITSvgiIjmhhC8ikhNK+CIiORE54ZvZ2Wa2ysxeN7ONZvaNEmXMzBabWYeZtZvZJVHrFRGR/jklhn0cBv6Hu68zsxHAWjNb6e6vF5WZAUwOfy4DHgwfRUQkIZFb+O6+293XhcvvApuACccVmwX83ANrgFFmNi5q3SIi0ndxtPA/YmYTgYuB3x23aQKwo+h5Z7hud4l9tAAtAKeddtql559/fpwhiohk2tq1a//g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KkNmAxH69/AW5z9yPh6gEfrywys1uBJuBzRatPeE/dfVvpPcTuV8Av3f2QmX2N4NvRXyZUd1/MBh539w+L1qV5vCqm6hO+9zK1Qx+Um9phH8HXpVPCVlq/pnw4WVxm9raZjXP33WGC2nOSXd0MPOnuHxTtu6e1e8jM/hmYm2Rc7r4zfHzTzFYDFwNPkPLxMrOPAU8TfNivKdr3gI9XCX2ZCqSnTKeZnQKMJPh7quQ0In3at5ldQ/Ah+jl3P9Szvsx7GkcC6zUud99X9PSnBOdsel575XGvXR1DTH2Kq8hs4K7iFRU8Xr0pF3csxyoPXTolp3bw4EzIKoL+c4DbgLi+MSwL99eX/Z7QdxgmvZ5+8xuAkmf0KxGXmRV6ukTMbAxwBfB62scrfO+eJOjffPy4bXEer75MBVIc703Ac+HxWQbMtmAUzyRgMvByhFj6FZeZXQz8hGCqkz1F60u+pwnGNa7o6UyCK+4h+Fb7+TC+AvB5jv2mW9G4wtjOJzgJ+lLRukoer94sA74cjtaZBnSHDZp4jlUlzkQn9QPcSNCXdQh4G3gmXD8eWF5U7nqCG7RsI2gd9qw/l+AfsgP4v8DQmOIaDfwG2Ao8C5wRrm8CflpUbiLBJ/eg417/HPAaQeL6BXB6UnEB/yms+9XwcU41HC/gVuADYH3Rz5RKHK9Sfy8EXUQzw+W68PfvCI/HuUWvvTd83RvAjJj/3nuL69nw/6Dn+Czr7T1NKK7/A2wM618FnF/02jvC49gBfCXJuMLnC4CFx72uYseLoHG3O/xb7iQ413IncGe43QhuGLUtrLup6LWRj5WmVhARyYk8dOmIiAhK+CIiuaGELyKSE0r4IiI5oYQvIpITSvgiIjmhhC8ikhP/H0ONPCmRnWJKAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 生成训练集\n",
    "x_train = torch.unsqueeze(torch.linspace(-1, 1, num_samples), 1)\n",
    "y_train = x_train + 0.3 * torch.randn(num_samples, 1)\n",
    "\n",
    "# 测试集\n",
    "x_test = torch.unsqueeze(torch.linspace(-1, 1, num_samples), 1)\n",
    "y_test = x_test + 0.3 *  torch.randn(num_samples, 1)\n",
    "\n",
    "# 绘制训练集和测试集\n",
    "plt.scatter(x_train, y_train, c='r', alpha=0.5, label='train')\n",
    "plt.scatter(x_test, y_test, c='b', alpha=0.5, label='test')\n",
    "plt.legend(loc='upper left')\n",
    "plt.ylim((-2, 2))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "112f71f2",
   "metadata": {},
   "source": [
    "### 模型定义"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "6e4f5e40",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 定义一个可能会过拟合的网络\n",
    "net_overfitting = torch.nn.Sequential(\n",
    "    torch.nn.Linear(1, hidden_size),\n",
    "    torch.nn.ReLU(),\n",
    "    torch.nn.Linear(hidden_size, hidden_size),\n",
    "    torch.nn.ReLU(),\n",
    "    torch.nn.Linear(hidden_size, 1),\n",
    ")\n",
    "\n",
    "# 定义一个包含 Dropout 的网络\n",
    "net_dropout = torch.nn.Sequential(\n",
    "    torch.nn.Linear(1, hidden_size),\n",
    "    torch.nn.Dropout(0.5),  # p=0.5\n",
    "    torch.nn.ReLU(),\n",
    "    torch.nn.Linear(hidden_size, hidden_size),\n",
    "    torch.nn.Dropout(0.5),  # p=0.5\n",
    "    torch.nn.ReLU(),\n",
    "    torch.nn.Linear(hidden_size, 1),\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "729631eb",
   "metadata": {},
   "source": [
    "### 模型训练"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "489c6ba6",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 定义优化器和损失函数\n",
    "optimizer_overfitting = torch.optim.Adam(net_overfitting.parameters(), lr=0.01)\n",
    "optimizer_dropout = torch.optim.Adam(net_dropout.parameters(), lr=0.01)\n",
    "\n",
    "# 损失函数\n",
    "criterion = nn.MSELoss()\n",
    "\n",
    "# 分别进行训练\n",
    "for i in range(num_epochs):\n",
    "    # overfitting的网络：预测、损失函数、反向传播\n",
    "    pred_overfitting = net_overfitting(x_train)\n",
    "    loss_overfitting = criterion(pred_overfitting, y_train)\n",
    "    optimizer_overfitting.zero_grad()\n",
    "    loss_overfitting.backward()\n",
    "    optimizer_overfitting.step()\n",
    "    \n",
    "    # 包含dropout的网络：预测、损失函数、反向传播\n",
    "    pred_dropout = net_dropout(x_train)\n",
    "    loss_dropout = criterion(pred_dropout, y_train)\n",
    "    optimizer_dropout.zero_grad()\n",
    "    loss_dropout.backward()\n",
    "    optimizer_dropout.step()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "447bcd89",
   "metadata": {},
   "source": [
    "### 预测和可视化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "42c10551",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8+yak3AAAACXBIWXMAAAsTAAALEwEAmpwYAAA75klEQVR4nO3dd3xUZfb48c9JCIQQJBBCDdWCFJFAgqIgKhZQFHEt2LGBLvaKa2HX/a4/XWygWHDFrjQN4MoKFhBQxASlSydCUCDSQ0/y/P44EzKEhJSZySQz5/16zWtm7r1z7zM3cO4zzz33XHHOYYwxJvRFBLsBxhhjKoYFfGOMCRMW8I0xJkxYwDfGmDBhAd8YY8KEBXxjjAkTPgd8EWkmIjNEZJmILBWRe4tYRkRkpIisFpFFItLZ1+0aY4wpm2p+WEcO8KBz7mcRqQ3MF5GvnHPLvJbpA5zoeZwGvO55NsYYU0F87uE75/5wzv3seb0b+BVoWmixfsD7Tv0IxIlIY1+3bYwxpvT80cM/TERaAknAvEKzm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/+dCWMrVLRJKAN9FSJ1u8phf5N63AdjX2enspesU96K/aCzztqwtcwJG/dAPaLk/bTkZPgs71mhbI/VWSKcCNnmyd04Gdng6Nf/ZVIM5EV9QD6I+OZR0ANgPTPNObAFO9lrsIvUHLGrR3mD+9NfofcjUwAajhp3bFA98Aq4CvgXqe6cnAf7yWa4keuSMKff5bYDEauD4EYiuqXcAZnm0v9DzfWhn2F3A9cAhY4PXoFIj9VdS/F3SI6FLP62jP91/t2R+tvT77uOdzK4A+fv73XlK7vvb8P8jfP1NK+ptWULv+H7DUs/0ZwMlen73Fsx9XAzdXZLs87/8OPFvocwHbX2jn7g/Pv+VM9FzLHcAdnvmC3jBqjWfbyV6f9XlfWWkFY4wJE+EwpGOMMQYL+MYYEzYs4BtjTJiwgG+MMWHCAr4xxoQJC/jGGBMmLOAbY0yY+P9BWTRFLnT9KQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 在测试过程中不使用 Dropout\n",
    "net_overfitting.eval()\n",
    "net_dropout.eval()\n",
    "\n",
    "# 预测\n",
    "test_pred_overfitting = net_overfitting(x_test)\n",
    "test_pred_dropout = net_dropout(x_test)\n",
    "\n",
    "# 绘制拟合效果\n",
    "plt.scatter(x_train, y_train, c='r', alpha=0.3, label='train')\n",
    "plt.scatter(x_test, y_test, c='b', alpha=0.3, label='test')\n",
    "plt.plot(x_test, test_pred_overfitting.data.numpy(), 'r-', lw=2, label='overfitting')\n",
    "plt.plot(x_test, test_pred_dropout.data.numpy(), 'b--', lw=2, label='dropout')\n",
    "plt.legend(loc='upper left')\n",
    "plt.ylim((-2, 2))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f4d4fe39",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
